package com.pingan.generator.api.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.pingan.generator.api.entity.User;
import com.pingan.generator.api.util.JsonUtil;

@RestController
@RequestMapping(value = "/user")
public class UserController {

//	@RequestMapping(value = "/getUserInfo")
	public String getUserInfo(User user) {
		User user2 = new User();
//		user2.setName("梨花");
		user2.setAge(21);
		user2.setAddress("深圳南山");
		return JsonUtil.toJson(user2);
	}

	@RequestMapping(value = "/login")
	public String login(User user) {
		User user3 = new User();
		user3.setAge(25);
//		user3.setName("小李");
		return JsonUtil.toJson(user3);
	}
}
